<?php

class Application_Form_Auth extends Zend_Form
{
    public function init()
    {
        $this->setName('auth_form');
        parent::__construct();

        $login = new Zend_Form_Element_Text('login');
        $login->setLabel('Логин')
                ->setRequired(true)
                ->addValidator('NotEmpty')
                ->addValidator('Alnum')
                ->addFilter('StringTrim')
                ->addFilter('StringTags');
        
        $password = new Zend_Form_Element_Password('password');
        $password->setLabel('Пароль')
                ->setRequired(true)
                ->addValidator('NotEmpty');
        
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Вход');
        
        $this->addElement(array($login, $password, $submit));
    }
}

